#include<iostream>
using namespace std;

class SubSystemA
{
public:
	void DoThing()
	{
		cout << "SystemA run" << endl;
	}
};
class SubSystemB
{
public:
	void DoThing()
	{
		cout << "SystemB run" << endl;
	}
};
class SubSystemC
{
public:
	void DoThing()
	{
		cout << "SystemC run" << endl;
	}
};

class Facade
{
public:
	Facade()
	{
		m_subA = new SubSystemA();
		m_subB = new SubSystemB();
		m_subC = new SubSystemC();
	}
	~Facade()
	{

		delete m_subA;
		delete m_subB;
		delete m_subC;
	}
	void DoThing()
	{
		m_subA->DoThing();
		m_subB->DoThing();
		m_subC->DoThing();
	}

private:
	SubSystemA* m_subA;
	SubSystemB* m_subB;
	SubSystemC* m_subC;

};
int main11()
{
	SubSystemA* subA = new SubSystemA();
	SubSystemB* subB = new SubSystemB();
	SubSystemC* subC = new SubSystemC();
	subA->DoThing();
	subB->DoThing();
	subC->DoThing();

	cout << "---------------" << endl;
	Facade* facade = new Facade();
	facade->DoThing();
	delete subA;
	delete subB;
	delete subC;
	delete facade;

	return 0;
}